import myRequest from './index';

export const getAllAreaByParentIdApi = (id: number) => {
  return myRequest<any>(`/admin_api/region/query_by_parent_id/${id}`);
};

export const getRegionListApi = (data: any) => {
  return myRequest<any>('/admin_api/region/list', {
    method: 'POST',
    data,
  });
};

export const editRegionApi = (data: any) => {
  return myRequest<any>('/admin_api/region/edit', {
    method: 'POST',
    data,
  });
};

export const addRegionApi = (data: any) => {
  return myRequest<any>('/admin_api/region/add', {
    method: 'POST',
    data,
  });
};
